package com.treasure.web.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.treasure.common.model.PageResult;
import com.treasure.common.model.SessionUser;
import com.treasure.common.types.Corp;
import com.treasure.infrastructure.model.po.ChatHistory;
import com.treasure.web.command.request.chat.ChatHistoryDetailRequest;
import com.treasure.web.command.request.chat.ChatHistoryRequest;
import com.treasure.web.command.request.chat.ChatRelationRequest;
import com.treasure.web.command.request.chat.CorpChatHistoryDetailRequest;
import com.treasure.web.command.response.ConversationListResponse;
import com.treasure.web.command.response.chat.ChatHistoryDetailResponse;
import com.treasure.web.command.response.chat.ChatHistoryResponse;
import com.treasure.web.command.response.chat.ChatRelationResponse;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author sunhongmin
 * @since 2023-08-31
 */
public interface IChatHistoryService extends IService<ChatHistory> {

    /**
     * 获取企业用户聊天历史
     *
     * @param sessionUser
     * @param chatHistoryRequest
     * @return
     */
    IPage<ChatHistoryResponse> getChatHistoryList(SessionUser sessionUser, ChatHistoryRequest chatHistoryRequest);

    /**
     * 获取企业用户会话记录
     *
     * @param corp
     * @param chatRecordRequest
     * @return
     */
    ChatHistoryDetailResponse getChatHistoryDetailList(Corp corp, ChatHistoryDetailRequest chatRecordRequest);

    /**
     * 知识库关联查询
     * @param chatRelationRequest
     * @return
     */
    List<ChatRelationResponse> getQuestionRelationDocLit(ChatRelationRequest chatRelationRequest);

    /**
     * 企业对话查询
     *
     * @param corpChatHistoryDetailRequest
     * @param corpId
     * @return
     */
    PageResult<ConversationListResponse> queryChatHistoryDetailList(CorpChatHistoryDetailRequest corpChatHistoryDetailRequest, String corpId);
}
